MongoDB 性能调优

1. 打开数据库profile 性能分析功能

db.setProfilingLevel(2)

{ "was" : 0, "slowms" : 100, "sampleRate" : 1.0, "ok" : 1 }